#input Date birthDate, Date currentDate
#output boolean adult
def startTime = birthDate.getTime()
def endTime = currentDate.getTime()
def diffDays = (endTime.minus(startTime))/86400000
def tempAdult = true
if (diffDays > 6570) {
tempAdult = true;
} else {
tempAdult = false;
}
return ["adult" : tempAdult]
This .groovy script doesn't work and I can't understand why. Maybe I need to import some library?